package com.wave.wavesystem.develop.codeGenetrate.controller;

 import wave.common.pojo.entity.Result;
import com.wave.wavesystem.develop.codeGenetrate.pojo.dto.CodeGenerateDTO;
import com.wave.wavesystem.develop.codeGenetrate.service.CodeGenerateService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @author 夕下风波
 * @date 2024-12-19 22:07
 * @description
 */
@RestController
@RequestMapping("/codeGenerate")
@Tag(name = "代码生成接口")
public class CodeGenerateController {

    @Resource
    private CodeGenerateService codeGenerateService;

    @Operation(summary = "代码生成")
    @Order(1)
    @PostMapping("/generate")
    private Result<Boolean> codeGenerate(@Valid @RequestBody CodeGenerateDTO codeGenerateDTO) {
        return Result.status(codeGenerateService.codeGenerate(codeGenerateDTO));
    }

}
